package com.zy.mq.domain;

import org.apache.activemq.ActiveMQConnectionFactory;

import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;

public class JMSFactory {

    private static ConnectionFactory factory=new ActiveMQConnectionFactory(JMSConfig.USERNAME,JMSConfig.PASSWORD,JMSConfig.BROKEURL);

    public static Connection getConn()throws JMSException{
       return factory.createConnection();
    }


}
